<?php
/**
 * Created by PhpStorm.
 * User: ZN_nick
 * Date: 2017/11/23
 * Time: 10:06
 */

use Kinfy\Http\Route;

Route::pattern('id','[0-9]+');

Route::get('/admin', 'AdminHome@index');

Route::get('/login', 'User@loginPage');
Route::post('/login', 'User@login');

//后台的所有路由前缀
Route::group('/admin', function () {
    Route::get('/article', 'AdminArticle@index');
    Route::get('/article/add', 'AdminArticle@addPage');
    Route::post('/article/add', 'AdminArticle@add');
    Route::get('/article/{id}/del', 'AdminArticle@del');

    Route::get('/article/{id}/edit', 'AdminArticle@editPage');
    Route::post('/article/{id}/update', 'AdminArticle@update');

});



















